<?php
$mysql_host="localhost";
$mysql_user="webdev";
$mysql_pwd="m1n1gst@tsX2o12";
$mysql_db="mining_tool";
$debug=0;

$connection=mysql_connect($mysql_host, $mysql_user, $mysql_pwd) or die("Verbindungsversuch fehlgeschlagen");
mysql_select_db($mysql_db, $connection) or die("Konnte die Datenbank nicht waehlen.");
function do_view(){
    
     $sql = "select * from lang_stats";	
     $result = mysql_query($sql);
     $total = mysql_affected_rows();
     $num = $total-($page-1)*$page_num;  
	 if($total < 1){
        echo("<tr><td colspan=2 align=center height=50>No results found.</td></tr>");
		//echo $total;
     }
	      while($data = mysql_fetch_array($result)){
		  $lang = $data["lang"];
		  if ($lang == "000")
		  {
		  $lang = "unknown";
		  }
      echo("
             <tr height=25>              
              <td align=center width=80>$data[lang]</a></td>                 	  
              <td align=center width=80>$data[count_user]</td>
             </tr>
      ");  
		  }
}

$sql_02 = ("SELECT SUM(count_user) FROM lang_stats");
$gesamt = mysql_query($sql_02);
?>
<div>
<br />
<center>
<img src="http://eve.vigaming.de/templates/clansphere/images/csphere_logo.png" alt="">
<div id="content" align="center"><h1>Virtual Gaming - Mining Tool Statistik</div>
<table width="90%" border="0" cellspacing="8" cellpadding="0">
<tr> 
<h3>Gesamt: <?php 

echo mysql_result($gesamt, 0); ?></h3>
                      <td valign="top">
				      </span></strong>
<table cellspacing=0 cellpadding=1 bordercolorlight='#cccccc' bordercolordark='#ffffff' width='100%' border=1 >                 	  
   	    <?php do_view();?>
   	    </table>
</table>
</br>
</br>
Written by Ariko Taylor
</div>
</div>
</div>


</center>
</body>